package com.zzxy.mvc12.controller;

import com.zzxy.mvc12.ext.UserExt;
import com.zzxy.mvc12.po.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserAnnoController {
    @RequestMapping("/test")
    public String test(){
        return "redirect:list.do";

    }
    @RequestMapping("/list")
    public String list(Model model){
        model.addAttribute("username","zhangwuji");
        return "/user/userList";
    }

    @RequestMapping("toRegister")
    public String toRegister(){
        return "/user/register";
    }
    @RequestMapping("register1")
    public  String assUser(UserExt ext, Model model){


        model.addAttribute("userExt",ext);
        System.out.println(ext);
        return "/user/userList";
    }
}
